 <html>

 <head>
     <meta name="viewport" content="width=device-width">
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <title>自己背单词</title>
     <script src="/static/jquery.js" type="text/javascript"></script>

     <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
     <link href="/static/font-awesome.min.css" rel="stylesheet">
     <script>
         function playMusic(path) {
             var audioEle = document.getElementById("audio");
             audioEle.src = path;
             audioEle.load();
             if (audioEle.paused) {
                 /*如果已经暂停*/
                 audioEle.play(); //播放
             } else {
                 audioEle.pause(); //暂停
             }
         }
     </script>
 </head>

 <body>
     <div class="container">
         <h1>所有不认识的单词</h1>

         <div class="">
             {volist name="result" id="danci"}

             <div id="w_{$danci.words}" class="col-md-3">
                 <a type="button" class="btn btn-primary" title="{$danci.spell}">{$danci.words}</a>
                 <button type="button" class="btn btn-default btn-sm" onmousedown='$("#id_{$danci.id}").toggle();'>
                     <span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>
                 </button>
                 <button type="button" class="btn btn-default btn-sm" onclick='playMusic("{$danci.audio}");' >
                     <span class="glyphicon glyphicon-play-circle " aria-hidden="true"></span>
                 </button>
                 <button type="button" class="btn btn-default btn-sm">
                     <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                 </button>
                 <div id="id_{$danci.id}" style="display:none;">
                     <ul class="list-unstyled">
                         {$danci.means}
                     </ul>
                 </div>
                 <hr>
             </div>


             {/volist}
         </div>





     </div>


     <audio id="audio" src=""></audio>
 </body>

 </html>